package com.scau402.system1.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scau402.common.annotation.Excel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 商品出库单主表
 * </p>
 *
 * @author
 * @since 2023-12-23
 */
@Data
@Accessors(chain = true)
@TableName("wms_new_outbound_order")
public class WmsOutboundOrderDO implements Serializable{

    private static final long serialVersionUID = 1L;


    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 出库类型(0销售出库、1借货出库、2还货出库、3加工出库)
     */
    @TableField("order_type")
    @Excel(name = "出库类型")
    private String orderType;

    /**
     * 客户Id
     */
    @TableField("client_id")
    private Long clientId;

    /**
     * 出库单编号
     */
    @Excel(name = "出库单编号")
    @TableField("order_code")
    private String orderCode;

    /**
     * 订单批次
     */
//    @Excel(name = "订单批次")
    @TableField("order_batch")
    private String orderBatch;

    /**
     * 订单日期
     */
//    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("order_date")
    private Date orderDate;

    /**
     * 有效期
     */
    @Excel(name = "出库单编号", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("valid_date")
    private Date validDate;

    /**
     * 供应商主键ID
     */
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 出库仓库主键ID
     */
    @TableField("warehouse_id")
    private Long warehouseId;

    /**
     * 创建者
     */
    @TableField("create_by")
    private String createBy;
    /**
     * 出库目的仓库主键ID
     */
    @TableField("des_warehouse_id")
    private Long desWarehouseId;

    /**
     * 加工厂主键ID
     */
    @TableField("processor_id")
    private Long processorId;

    /**
     * 关联入库单主键
     */
    @TableField("inbound_order_id")
    private Long inboundOrderId;

    /**
     * 销售结算方式
     */
    @TableField("settlement_type")
    @Excel(name = "出库单编号")
    private String settlementType;

    /**
     * 销售结算比率
     */
    @TableField("settlement_ratio")
    @Excel(name = "出库单编号")
    private BigDecimal settlementRatio;

    /**
     * 出借天数
     */
    @TableField("lend_days")
    private Integer lendDays;

    /**
     * 是否结账（0未结账 1已结账）
     */
    @TableField("is_settle")
    @Excel(name = "出库单编号")
    private String isSettle;

    /**
     * 结账日期
     */
    @TableField("settle_time")
    @Excel(name = "结账日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date settleTime;

    /**
     * 结账人ID
     */
    @TableField("settle_by")
    private Long settleBy;


    /**
     * 更新者
     */
    @TableField("update_by")
    private String updateBy;


    /**
     * 状态(待到货、待卸货、待分拣、已分拣 已合并,已出库)
     */
    @TableField("status")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableField("del_flag")
    private String delFlag;

    /**
     * 备注
     */
    @TableField("remark")
    @Excel(name = "备注")
    private String remark;

    /**
     * 租户ID
     */
    @TableField("tenant_id")
    @Excel(name = "租户ID")
    private Long tenantId;

    /**
     * 部门ID
     */
    @TableField("dept_id")
    private Long deptId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Excel(name = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateTime;

    /**
     * 出库总数
     */
    @TableField(exist = false)
    @Excel(name = "出库总数")
    private Long outboundSumCount;

    /**
     * 仓库名称
     */
    @TableField(exist = false)
    @Excel(name = "仓库名称")
    private String warehouseName;

    /**
     *  客户名称
     */
    @TableField(exist = false)
    @Excel(name = "客户名称")
    private String clientName;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    @Excel(name = "供应商名称")
    private String supplierName;

    /**
     * 还货出库的入库单编码
     */
    @TableField(exist = false)
    @Excel(name = "还货出库的入库单编码")
    private String inboundOrderCode;

    /**
     * 审核单id
     */
    @TableField("audit_id")
    private Long auditId;

//    /**
//     * 审核单号
//     */
//    @TableField(exist = false)
//    private String auditOrderCode;
}

